package com.ffs.game.utils;

import io.netty.channel.Channel;
import io.netty.util.AttributeKey;

/**
 * @author ffs80
 * @date 2022/4/4 19:43
 */
public class AttributeUtil {

    public static <T> T get(Channel channel, AttributeKey<T> key) {
        return channel.attr(key).get();
    }

    public static <T> void set(Channel channel, AttributeKey<T> key, T value) {
        channel.attr(key).set(value);
    }

}
